// core
import { createApp } from "vue"
import App from "@/App.vue"
import store from "@/store"
import router from "@/router"
import "@/router/permission"
// load
import { loadSvg } from "@/icons"
import { loadPlugins } from "@/plugins"
import { loadDirectives } from "@/directives"
import VxeUI from "vxe-pc-ui"
import "vue-fabric/dist/vue-fabric.min.css"
import { Fabric } from "vue-fabric"
import VForm3 from "vform3-builds"

import gridLayout from "vue-grid-layout"

import "vform3-builds/dist/designer.style.css" //引入VForm3样式
// css
import "uno.css"
import "normalize.css"
import "element-plus/dist/index.css"
import "element-plus/theme-chalk/dark/css-vars.css"
import "vxe-table/lib/style.css"
import "vxe-table-plugin-element/dist/style.css"
import "@/styles/index.scss"
import "vfonts/Lato.css"
import "vfonts/FiraCode.css"

import "vxe-pc-ui/lib/style.css"
import "vxe-table/lib/style.css"
import naive from "naive-ui"

// main.js中注册

const app = createApp(App)

/** 加载插件 */
loadPlugins(app)
/** 加载全局 SVG */
loadSvg(app)
/** 加载自定义指令 */
loadDirectives(app)
app.use(store).use(Fabric).use(router).use(naive).use(VxeUI).use(gridLayout).use(VForm3)
router.isReady().then(() => {
  app.mount("#app")
})
